package studentdemo.server;

import studentdemo.dao.ReportDao;
import studentdemo.dao.ReportDaoImpl;
import studentdemo.modul.Report;
import java.util.List;

public class ReportService {
    private final ReportDao reportDao = new ReportDaoImpl();

    public boolean addReport(Report report) {
        return reportDao.insertReport(report) > 0;
    }

    public boolean updateReport(Report report) {
        return reportDao.updateReport(report) > 0;
    }

    public boolean deleteReport(String resno, String recno) {
        return reportDao.deleteReport(resno, recno) > 0;
    }

    public List<Report> getReportsByStudent(String resno) {
        return reportDao.getReportsByStudent(resno);
    }

    public List<Report> getReportsByCourse(String recno) {
        return reportDao.getReportsByCourse(recno);
    }

    public List<Report> getReportsByTeacher(String retno) {
        return reportDao.getReportsByTeacher(retno);
    }

    public List<Report> getReportsBySemester(String semester) {
        return reportDao.getReportsBySemester(semester);
    }

    public List<Report> getAllReports() {
        return reportDao.getAllReports();
    }
} 